package org.huanletao.ssm.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
 * <p>
 * </p>
 * package: org.huanletao.ssm
 * description:
 * className: WebMvcConfig
 * author:  踏雪无痕
 * copyright: Copyright (c) 2022/8/25 13:40
 * since: 1.0.0
 */
@EnableWebMvc
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/template/**","/static/**")
                .addResourceLocations("classpath:/template/","classpath:/static/");
        registry.addResourceHandler("/favicon.ico").addResourceLocations("classpath:/favicon/favicon.ico");
    }
}
